<script setup lang="ts">

import { provide, ref } from "vue";
import XinJian from "../coms/XinJian.vue";

import XinJian1 from "../coms/XinJian1.vue";
import XinJian2 from '../coms/XinJian2.vue';
import XinJian3 from "../coms/XinJian3.vue";

const parentNum=ref(0)

const onUploadNum=(num:number)=>{
    parentNum.value=num
}

provide("num",100)

</script>

<template>

 <div class="index-page">
  
  <XinJian></XinJian>
  <div>aaaa</div>

  <!--父传子-->
  <XinJian1 :aa="111" :bb="'什么'"></XinJian1>
  <!--子传父-->
  <XinJian2 @upload-num="onUploadNum":num='100'></XinJian2>
  <!--祖宗传后代-->
  <XinJian3></XinJian3>


 
  </div>

</template>

<style scoped></style>
